package org.ewicom.ppsaddressbook;

import android.net.Uri;
import android.provider.BaseColumns;

public class PPSAddressBook {

	public static final String AUTHORITY = "org.ewicom.ppsaddressbook.provider.PPSAddressBook";
	
	private PPSAddressBook(){
		
	}
	
	/**
	 * 
	 * @author Marcin Kunicki
	 * Table unit
	 */
	public static final class UnitColumns implements BaseColumns {
		
		private UnitColumns(){
			
		}
		
		/**
		 * Content style Uri for Unit Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/units");
		
		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of units.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.unit";
		
		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single unit.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.unit";
		
		/**
		 * Default sort order for table unit (by name)
		 */
		public static final String DEFAULT_SORT_ORDER = "short_name ASC";
		
		public static final String UNIT_TABLE_NAME = "unit";
		
		/*****************************************************
		 * Definitions of Columns
		 */
		
		/**
		 * The name of unit
		 * <P>type: TEXT</P>
		 */
		public static final String NAME = "name";
		
		/**
		 * The street of unit address
		 * <P>type: TEXT</P>
		 */
		public static final String SHORT_NAME = "short_name";
		
		/**
		 * The street of unit address
		 * <P>type: TEXT</P>
		 */
		public static final String STREET = "street";
		
		/**
		 * The postcode of unit address
		 * <P>type: TEXT</P>
		 */
		public static final String POSTCODE = "postcode";
		
		/**
		 * The city of unit address
		 * <P>type: TEXT</P>
		 */
		public static final String CITY = "city";
		
		/**
		 * Primary phone of unit
		 * <P>type: TEXT</P>
		 */
		public static final String PHONE = "phone";
		
		/**
		 * Primary email of unit
		 * <P>type: TEXT</P>
		 */
		public static final String EMAIL = "email";
	}
	
	/**
	 * 
	 * @author Marcin Kunicki
	 * Table person
	 *
	 */
	public static final class PersonColumns implements BaseColumns{
		
		private PersonColumns(){
			
		}
		
		/**
		 * Content style Uri for Person Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/persons");
		
		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of persons.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.person";
		
		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single person.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.person";
		
		/**
		 * Default sort order for table person (by _id)
		 */
		public static final String DEFAULT_SORT_ORDER = "_id ASC";
		
		public static final String PERSON_TABLE_NAME = "person";
		
		/*****************************************************
		 * Definitions of Columns
		 */
		
		/**
		 * Foreign key from unit table
		 * <P>type: INTEGER</P>
		 */
		public static final String UNIT_ID = "unit_id";
		
		/**
		 * Position name of person
		 * <P>type: TEXT</P>
		 */
		public static final String POSITION = "position";
		
		/**
		 * Person rank, name and surname
		 * <P>type: TEXT</P>
		 */
		public static final String PERSON = "person";
		
		/**
		 * Person phone
		 * <P>type: TEXT</P>
		 */
		public static final String PHONE = "phone";
		
		/**
		 * Person email
		 * <P>type: TEXT</P>
		 */
		public static final String EMAIL = "email";
		
	}
	
	/**
	 * 
	 * @author Marcin Kunicki
	 * Table phone
	 *
	 */
	public static final class PhoneColumns implements BaseColumns{
		
		private PhoneColumns(){
			
		}
		
		/**
		 * Content style Uri for phone Table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/phones");
		
		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of phones.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.ewicom.phone";
		
		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single phone.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.ewicom.phone";
		
		/**
		 * Default sort order for table phone (by _id)
		 */
		public static final String DEFAULT_SORT_ORDER = "_id ASC";
		
		public static final String PHONE_TABLE_NAME = "phone";
		
		/*****************************************************
		 * Definitions of Columns
		 */
		
		/**
		 * Foreign key from unit table
		 * <P>type: INTEGER</P>
		 */
		public static final String UNIT_ID = "unit_id";
		
		/**
		 * Phone type
		 * <P>type: TEXT</P>
		 */
		public static final String TYPE = "type";
		
		/**
		 * Phone number
		 * <P>type: TEXT</P>
		 */
		public static final String PHONE = "phone";
	}
	
}
